/*
 * @Author: wuqingchun
 * @Date: 2024-07-01 15:36:19
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-07-01 15:46:35
 */
#ifndef __ARQ_ALLOCATOR_H__
#define __ARQ_ALLOCATOR_H__

#include <array>

class CARQAllocator
{
    static constexpr size_t MEM_BLOCK_COUNT_MAX = 1024;
    static constexpr size_t MEM_BLOCK_SIZE = 1 << 30;
public:
    void* Alloc(size_t ulSize);
private:
    uint32_t m_uiBlockIndex = 0;
    uint32_t m_uiOffset = 0;
    std::array<char*, MEM_BLOCK_COUNT_MAX> m_arrMemBlock;
};

#endif //__ARQ_ALLOCATOR_H__